---
apiVersion: v1
data:
  ks-config.yaml: |
    ---
    kubernetes:
      apiserverAddr: {{ kube_apiserver_host }}      # master addr or master's lb addr

    etcd:
      endpointIps: {{ etcd_endpoint_ips }}
      port: 2379
      tlsEnable: True

    persistence:
      storageClass: {{ storage_class }}

    common:
      mysqlVolumeSize: {{ mysql_volume_size }}
      minioVolumeSize: {{ minio_volume_size }}
      etcdVolumeSize: {{ etcd_volume_size }}
      openldapVolumeSize: {{ openldap_volume_size }}
      redisVolumSize: {{ redis_volume_size }}

    metrics-server:
      enabled: {{ metrics_server_enabled }}

    console:
      disableMultiLogin: True  # enable/disable multi login
      port: {{ console_port }}
      replicas: {{ ks_console_replicas | default(2) }}

    monitoring:
      prometheusReplicas: {{ prometheus_replicas | default(2) }}
      prometheusMemoryRequest: {{ prometheus_memory_request }}
      prometheusVolumeSize: {{ prometheus_volume_size }}
      grafana:
        enabled: {{ grafana_enabled }}

    logging:
      enabled: {{ logging_enabled }}
      elasticsearchMasterReplica: {{ elasticsearch_master_replica }}
      elasticsearchDataReplica: {{ elasticsearch_data_replica }}
      elasticsearchVolumeSize: {{ elasticsearch_volume_size }}
      logMaxAge: {{ log_max_age }}
      elkPrefix: {{ elk_prefix }}
{% if external_es_url is defined and external_es_port is defined %}
      externalElasticsearchUrl: {{ external_es_url }}
      externalElasticsearchPort: {{ external_es_port }}
{% endif %}
      containersLogMountedPath: ""
      kibana:
        enabled: {{ kibana_enabled }}

    openpitrix:
      enabled: {{ openpitrix_enabled }}

    devops:
      enabled: {{ devops_enabled }}
      jenkinsMemoryLim: {{ jenkins_memory_lim }}
      jenkinsMemoryReq: {{ jenkins_memory_req }}
      jenkinsVolumeSize: {{ jenkins_volume_size }}
      jenkinsJavaOpts_Xms: {{ jenkinsJavaOpts_Xms }}
      jenkinsJavaOpts_Xmx: {{ jenkinsJavaOpts_Xmx }}
      jenkinsJavaOpts_MaxRAM: {{ jenkinsJavaOpts_MaxRAM }}
      sonarqube:
        enabled: {{ sonarqube_enabled }}

    servicemesh:
      enabled: {{ servicemesh_enabled }}

    notification:
      enabled: {{ notification_enabled }}

    alerting:
      enabled: {{ alerting_enabled }}

    harbor:
      enabled: {{ harbor_enabled }}
      domain: {{ harbor_domain }}
    gitlab:
      enabled: {{ gitlab_enabled }}
      domain: {{ gitlab_hosts_domain }}

kind: ConfigMap
metadata:
  name: ks-installer
  namespace: kubesphere-system